package pl.butler.cezary.syncTool.scanning.detectors;

import java.io.File;
import pl.butler.cezary.syncTool.scanning.ChangeStatus;
import pl.butler.cezary.syncTool.storage.metadata.FileVersionMetadata;

class SizeBasedDetector implements IDetector {

    public ChangeStatus checkIfChanged(File plik, FileVersionMetadata metadane) {
        if (metadane.getRozmiarPliku() != plik.length()) {
            return ChangeStatus.LOCAL;
        }
        return ChangeStatus.CHANGED;
    }
}
